#!/usr/bin/env python
# encoding: utf-8


"""
@file: others.py
@time: 2017/3/15 上午9:50
"""
# 一些特殊的元函数
from mathsolver.functions.base import *
from mathsolver.functions.budengshi import common_opers as co


# 验证点是否满足不等式组
class ManZhuBuDengShiZu(BaseFunction):
    def solver(self, *args):
        self.label.add('点与可行域的关系')
        x_y_symbols = ['x', 'y']
        ineqs = args[0].sympify()
        point = zip(x_y_symbols, args[1].sympify())
        result = co.satisfied_ineqs(ineqs, point)
        self.output.append(BaseVariable(result))
        return self
